home *** CD-ROM | disk | FTP | other *** search
- #ifndef SYS_DIRENT_H
- #define SYS_DIRENT_H
-
- /*
- ** $VER: sys/dirent.h 1.1 (18.09.98)
- ** Includes Release 44.10
- **
- ** Copyright © 1996/98 by CyberdyneSystems
- **
- ** written by Matthias Henze
- ** All Rights Reserved
- */
-
- #ifndef STORMAMIGA_H
- #include <stormamiga.h>
- #endif
-
- struct dirent {
- uint d_fileno; /* file number of entry */
- ushort d_reclen; /* length of this record */
- uchar d_type; /* file type, see below */
- uchar d_namlen; /* length of string in d_name */
- #ifdef _POSIX_SOURCE
- char d_name[255 + 1]; /* name must be no longer than this */
- #else
- #define MAXNAMLEN 255
- char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */
- #endif
- };
-
- /* File types */
- #define DT_UNKNOWN 0
- #define DT_FIFO 1
- #define DT_CHR 2
- #define DT_DIR 4
- #define DT_BLK 6
- #define DT_REG 8
- #define DT_LNK 10
- #define DT_SOCK 12
- #define DT_WHT 14
-
- /* Convert between stat structure types and directory types. */
- #define IFTODT(mode) (((mode) & 0170000) >> 12)
- #define DTTOIF(dirtype) ((dirtype) << 12)
-
- #endif /* SYS_DIRENT_H */
-